﻿<%@ Page Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="Admin_QLNSX.aspx.cs" Inherits="ppm_BaByShop.WebForm21" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        QUẢN LÝ NHÀ SẢN XUẤT</p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConflictDetection="CompareAllValues" 
            ConnectionString="<%$ ConnectionStrings:ppm_BaByShopConnectionString1 %>" 
            DeleteCommand="DELETE FROM [NHA_SX] WHERE [ma_nsx] = @original_ma_nsx AND [ten_nsx] = @original_ten_nsx AND [ma_tt_nsx] = @original_ma_tt_nsx" 
            InsertCommand="INSERT INTO [NHA_SX] ([ma_nsx], [ten_nsx], [ma_tt_nsx]) VALUES (@ma_nsx, @ten_nsx, @ma_tt_nsx)" 
            OldValuesParameterFormatString="original_{0}" 
            SelectCommand="SELECT * FROM [NHA_SX]" 
            
            UpdateCommand="UPDATE [NHA_SX] SET [ten_nsx] = @ten_nsx, [ma_tt_nsx] = @ma_tt_nsx WHERE [ma_nsx] = @original_ma_nsx AND [ten_nsx] = @original_ten_nsx AND [ma_tt_nsx] = @original_ma_tt_nsx">
            <DeleteParameters>
                <asp:Parameter Name="original_ma_nsx" Type="String" />
                <asp:Parameter Name="original_ten_nsx" Type="String" />
                <asp:Parameter Name="original_ma_tt_nsx" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="ten_nsx" Type="String" />
                <asp:Parameter Name="ma_tt_nsx" Type="Int32" />
                <asp:Parameter Name="original_ma_nsx" Type="String" />
                <asp:Parameter Name="original_ten_nsx" Type="String" />
                <asp:Parameter Name="original_ma_tt_nsx" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="ma_nsx" Type="String" />
                <asp:Parameter Name="ten_nsx" Type="String" />
                <asp:Parameter Name="ma_tt_nsx" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" 
            AutoGenerateRows="False" DataKeyNames="ma_nsx" DataSourceID="SqlDataSource1" 
            Height="50px" Width="125px">
            <Fields>
                <asp:BoundField DataField="ma_nsx" HeaderText="ma_nsx" ReadOnly="True" 
                    SortExpression="ma_nsx" />
                <asp:BoundField DataField="ten_nsx" HeaderText="ten_nsx" 
                    SortExpression="ten_nsx" />
                <asp:BoundField DataField="ma_tt_nsx" HeaderText="ma_tt_nsx" 
                    SortExpression="ma_tt_nsx" />
                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                    ShowInsertButton="True" ShowSelectButton="True" />
            </Fields>
        </asp:DetailsView>
    </p>
</asp:Content>
